﻿using System;
using System.Windows;
using UCL.Powersource;
namespace PowersourceUIToolkit
{
    public interface IUIManager: IDisposableEx
    {
        IViewConductor ActivateViewModelInConductor(UCL.Powersource.IViewModel rootModel, IViewConductor twpcToActivateIn = null);
        IViewConductor GetConductorForViewModel(UCL.Powersource.IViewModel rootModel);
        System.Windows.Controls.Control GetOrCreateControl(object rootModel);
        IViewConductor GetViewConductor<T>(T rootControl) where T : class;

        Type GetViewType<T>(T rootModel) where T : IViewModel;
        
        void Bind(IViewModel vm,FrameworkElement iview,object context);
        void EnsureConductorRegistered(ViewConductorBase viewConductorBase);
    }
}
